package cn.catsdad.dto;

import cn.catsdad.entity.Role;
import cn.catsdad.vo.TreeNodeVO;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.ArrayList;
import java.util.List;

/**
 * 角色dto
 *
 * @author xuyonglong
 * @version V1.0 2023/3/29
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Entity
@Table(name = "tb_auth_role")
public class RoleDTO extends Role {

    /**
     * 具备的菜单树形
     */
    @Transient
    private List<TreeNodeVO> menus = new ArrayList<>();

    /**
     * 菜单id
     */
    @Transient
    private List<Long> menuIds = new ArrayList<>();

    /**
     * 关联用户id
     */
    @Transient
    private List<Long> userIds = new ArrayList<>();

}
